<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"> </script> 
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/mobilenet@1.0.0"> </script>
</head>
<body>
    <img id="img" src="dog.jpg"/>
</body>
</html>
<script>
async function run(){
  const img = document.getElementById('img');

  // Load the model.
  mobilenet.load().then(model => {
    // Classify the image.
    model.classify(img).then(predictions => {
      console.log('Predictions: ');
      console.log(predictions);
    });
      embeddings = model.infer(img, embedding=true);
      console.log(embeddings);
  });
}

run();
    
</script>